package com.lovo.controller;


import com.lovo.result.ResponseResult;
import com.lovo.service.ICommodityService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author bdk
 * @since 2021-03-10
 */
@RestController
@RequestMapping("/commodities")
@ResponseResult
public class CommodityController {
    @Resource
    private ICommodityService commodityService;
    @GetMapping("/{id}")
    public Object getById(@PathVariable("id") Long id){

        return commodityService.getById(id);
    }
}

